#ifndef __ADXL345_AS
#define __ADXL345_AS

#include <math.h>

#include "driver/i2c.h"
#include "driver/gpio.h"
#include "esp_log.h"

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"

typedef enum {
    actionNone,
    actionUp,
    actionDown,
    actionLeft,
    actionRight
}ActionEnum;

typedef struct {
    void (* init)(void);
    void (* getAngle)(short *xAngle, short *yAngle, short *zAngle, uint8_t times);
    short xAngle;
    short yAngle;
    short zAngle;
    char action;
    uint16_t noActionCount;
} ADXL345ClassStruct;

extern ADXL345ClassStruct ADXL345Class;

void ADXL345_init(void);

#endif
